﻿Imports System.IO

Public Class frmUtilityChoix

    Private Sub btnMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMenu.Click
        FormMain.Show()
        Me.Hide()
    End Sub

    Private Sub PtcChrono_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PtcChrono.Click
        frmUtilityChronometer.Show()
        'frmUtilityChrono.Show()
        Me.Hide()
    End Sub

    Private Sub PtcBoussole_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PtcBoussole.Click
        If ((m_isFormGPSOpen = True) And (m_isGpsInterpreteurOpen = True)) Then
            frmUtilitycompass.Show()
            Me.Hide()
        Else
            MsgBox(DirectCast(My.Resources.Images.alertNoGPS, String), MsgBoxStyle.Critical, "Pocket eRelevé")
        End If
    End Sub

    Private Sub PctTrack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PctTrack.Click
        frmUtilityTracks.Show()
        Me.Hide()
    End Sub

    Private Sub PctCarte_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PctCarte.Click
        If File.Exists("/Program Files/OpenMobileMaps/OpenMobileMaps.exe") Then
            Process.Start("/Program Files/OpenMobileMaps/OpenMobileMaps.exe", "")
        Else
            MsgBox("Install OpenMobileMaps first", MsgBoxStyle.Critical, "Pocket eReleve")
        End If
    End Sub

End Class